package com.youmans.educms.controller;


import com.youmans.commonutils.R;
import com.youmans.educms.entity.CrmBanner;
import com.youmans.educms.service.CrmBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author Youmans
 * @since 2022-05-15
 */
@RestController
@Api(tags = "banner前端控制器")
@RequestMapping("/educms/bannerFront")
public class BannerFrontController {
    @Autowired
    private CrmBannerService crmBannerService;

    @ApiOperation("获取所有banner")
    @GetMapping("getAllBanner")
    public R findAllTeacher(){
        List<CrmBanner> list = crmBannerService.selectAllBanner();
        return R.ok().data("list",list) ;
    }
}

